// 获取所有带有“关键代码”类的元素
const keyCodeElements = document.querySelectorAll('.key-code');

// 为每个元素添加鼠标悬停事件监听器
keyCodeElements.forEach(element => {
    element.addEventListener('mouseover', () => {
        element.classList.remove('hidden');
        element.classList.add('visible');
    });

    element.addEventListener('mouseout', () => {
        element.classList.remove('visible');
        element.classList.add('hidden');
    });
});